/* settings-base.css - 基础样式和动画 */

/* 动画关键帧 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* 背景遮罩 */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002; /* 修改为10002，高于标题栏的10001 */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.settings-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-overlay.closing {
  opacity: 0;
  pointer-events: none;
}

/* 主设置窗口 - 使用动画实现对称的开启和关闭效果 */
.settings-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 700px;
  height: 85%;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s ease-out;
  overflow: hidden;
}

/* 开启动画 - 使用slideIn关键帧 */
.settings-overlay.open .settings-modal {
  animation: slideIn 0.3s ease-out forwards;
}

/* 关闭动画 - 使用slideOut关键帧 */
.settings-overlay.closing .settings-modal {
  animation: slideOut 0.3s ease-out forwards;
}

/* 头部样式 */
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.settings-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-header h2::before {
  content: "⚙️";
  font-size: 1.25rem;
}

.close-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.25rem;
  color: #64748b;
}

.close-btn:hover {
  background: #ffffff;
  color: #334155;
  transform: rotate(90deg);
  /* 发光光晕阴影特效 */
  box-shadow: 
    0 0 12px rgba(59, 130, 246, 0.6);
}